# -*- coding: utf-8 -*-

# WACLOUD_API_ENDPOINT = "https://api.fjhxrl.com"        # 福建 sass平台接口地址
# WACLOUD_API_ENDPOINT = "https://api.workai.com.cn"  # saas平台 接口地址
WACLOUD_API_ENDPOINT = "http://47.110.250.177:20000"  # 测试环境  石头

# rpc response code begin
JOB_ACCEPT = 2000

CITY_CODE_NOT_SUPPORT = 4000
ACCOUNT_TYPE_NOT_SUPPORT = 4001
BOT_IN_RUN = 4002
BOT_NOT_IMPLEMENT = 4003
# rpc response code end

# support bot type begin
BOT_TYPE_INS = '0'  # 社保
BOT_TYPE_HF = '1'  # 公积金
# support bot type end

# op type begin
OP_TYPE_INCREASE = 'increase'  # 增员
OP_TYPE_DECREASE = 'decrease'  # 减员
OP_TYPE_PAYBACK = 'payback'  # 补缴
# op type end
OP_TYPE_TRANSFERIN = 'transferin'  # 转入

# handle type begin
HANDLE_TYPE_ADDED = '0'  # 新增
HANDLE_TYPE_INTO = '1'  # 转入
HANDLE_TYPE_PAYBACK = '2'  # 补缴
# handle type end

DEFAULT_LIMIT = 20
DEFAULT_OFFSET = 0

# status begin
STATUS_SUCCESS = 'success'
STATUS_FAIL = 'fail'
STATUS_AVAIL = 'avail'
STATUS_COMPLETED = 'completed'
STATUS_UNCOMPLETED = 'uncompleted'
STATUS_RUNNING = 'running'
STATUS_INIT = 'init'
STATUS_CONFORMING = 'confirming'
STATUS_SYNCING = 'syncing'
STATUS_PULLING_JOB = 'pulling_job'
NO_COMMENT = 'no comment'
# status end

ACTION_REGISTER = 'register'
ACTION_DEREGISTER = 'deregister'
ACTION_DONE = 'done'

# account type begin
ACCOUNT_TYPE_INS = '0'
ACCOUNT_TYPE_HF = '1'
ACCOUNT_TYPE_INS_HF = '2'
# account type end

# worker healthcheck begin
WORKER_RUN_SUCCESS = 'ok'
WORKER_RUN_FAIL = 'fail'
# worker healthcheck end

# fuzhou website begin
FUZHOU_EDT = 'edt'
FUZHOU_JYT = 'jyt'
FUZHOU_DLB = 'dlb'
# fuzhou website end

# 苏州网站类型
SUZHOU_SHIQU = 'sq'
SUZHOU_GONGYEYUANQU = 'gyyq'
SUZHOU_XINXIGUANLI = 'xxgl'

# log name begin
LOG_NAME = 'sibot.log'
LOG_COMMON_NAME = 'Common.log'  # 0
LOG_CONTROLLER_NAME = 'server.log'  # 1
LOG_WORKER_NAME = 'worker.log'  # 2
LOG_BOT_NAME = 'watcher.log'  # 3
# log name end

# prepare begin
PREPARE_ANY = 'any'
PREPARE_MUST_BEFORE = 'must_before'
PREPARE_MUST_AFTER = 'must_after'
PREPARE_NEED = 'need'
PREPARE_NO_NEED = 'non_need'
PREPARE_FAILED = 'failed'
PREPARE_SUCCESS = 'success'
# prepare end

# 批量下载文件类型整合
EXPORT_ALL_TYPE = 'all'
EXPORT_INS_TYPE = 'ins'
EXPORT_SERIOUS_TYPE = 'serious'
EXPORT_STATUS_ALL = 'status_all'
EXPORT_STATUS_YES = 'status_hava'
EXPORT_STATUS_NO = 'statu_no'

FILE_TYPES = {
    # ins: 参保职工， serious：大病医疗
    '120100': [{'file_type': EXPORT_ALL_TYPE, 'desc': '全部'}, {'file_type': EXPORT_INS_TYPE, 'desc': '参保职工'},
               {'file_type': EXPORT_SERIOUS_TYPE, 'desc': '大额医疗'}],
    'export': [{'status': EXPORT_STATUS_ALL, 'desc': '全部'}, {'status': EXPORT_STATUS_YES, 'desc': '有文件'},
               {'status': EXPORT_STATUS_NO, 'desc': '无文件'}]
}

INCREASE_OP_TYPES = [
    {"name": "执行增员", "value": 0},
    {"name": "不执行增员", "value": 1}
]
DECREASE_OP_TYPES = [
    {"name": "执行减员", "value": 0},
    {"name": "不执行减员", "value": 1}
]

PAYBACK_OP_TYPES = [
    {"name": "执行补缴", "value": 0},
    {"name": "不执行补缴", "value": 1}
]

CONFIRM_OP_TYPES = [
    {"name": "执行查询", "value": 0},
    {"name": "不执行查询", "value": 1}
]

# Standard template Excels
NEW_INSURED = r"\standard_excel\新参模板.xlsx"
TRANSFER_IN = r"\standard_excel\转入模板.xlsx"
PAY_BACK = r"\standard_excel\补缴模板.xlsx"
DOWNSIZING = r"\standard_excel\减员模板.xlsx"
# Original Folder
ORIGINAL_FOLDER = r"\original_file\\"
# Local Folder
LOCAL_FOLDER = r'D:/Desktop'
# ACCOUNT TYPE
KINDS = [
    {"name": "社保", "value": 'ins'},
    {"name": "公积金", "value": 'hf'}
]
